<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Bluetooth Host Stack Library: wiced_bt_smp_adapter_t Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Bluetooth Host Stack Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structwiced__bt__smp__adapter__t.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">wiced_bt_smp_adapter_t Struct Reference<div class="ingroups"><a class="el" href="group__wiced__bt__platform__group.html">Bluetooth Stack Platform Interface</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
<div class="textblock"><p>SMP encryption. </p>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:aa59d753b4864101d3ffe3793fefbd50b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwiced__bt__smp__adapter__t.html#aa59d753b4864101d3ffe3793fefbd50b">pf_smp_process_private_key</a> )(const <a class="el" href="group__bt__types.html#gaba2488b09b25fdc24ea75828d1dbf73d">BT_OCTET32</a> *private_key, <a class="el" href="structwiced__bt__public__key__t.html">wiced_bt_public_key_t</a> *public_key)</td></tr>
<tr class="memdesc:aa59d753b4864101d3ffe3793fefbd50b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function to generate local public key.  <a href="#aa59d753b4864101d3ffe3793fefbd50b">More...</a><br /></td></tr>
<tr class="separator:aa59d753b4864101d3ffe3793fefbd50b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d8b53f5e1374c5f60f80234d61e0f15"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwiced__bt__smp__adapter__t.html#a1d8b53f5e1374c5f60f80234d61e0f15">pf_smp_compute_dhkey</a> )(const <a class="el" href="group__bt__types.html#gaba2488b09b25fdc24ea75828d1dbf73d">BT_OCTET32</a> *private_key, const <a class="el" href="structwiced__bt__public__key__t.html">wiced_bt_public_key_t</a> *public_key, <a class="el" href="group__bt__types.html#gaba2488b09b25fdc24ea75828d1dbf73d">BT_OCTET32</a> *dhkey)</td></tr>
<tr class="memdesc:a1d8b53f5e1374c5f60f80234d61e0f15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function to generate dhkey.  <a href="#a1d8b53f5e1374c5f60f80234d61e0f15">More...</a><br /></td></tr>
<tr class="separator:a1d8b53f5e1374c5f60f80234d61e0f15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7309a1ab817250593f4b59e4211fd1ce"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwiced__bt__smp__adapter__t.html#a7309a1ab817250593f4b59e4211fd1ce">pf_smp_ecdh_validate_pub_key</a> )(const <a class="el" href="structwiced__bt__public__key__t.html">wiced_bt_public_key_t</a> *public_key)</td></tr>
<tr class="memdesc:a7309a1ab817250593f4b59e4211fd1ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function to validate peer public key.  <a href="#a7309a1ab817250593f4b59e4211fd1ce">More...</a><br /></td></tr>
<tr class="separator:a7309a1ab817250593f4b59e4211fd1ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc85741fae7178abb83c60ea9df1060b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__wiced__bt__platform__group.html#ga7f85f07f930fed2fc50e855a69e7abcd">aes_context</a> *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwiced__bt__smp__adapter__t.html#afc85741fae7178abb83c60ea9df1060b">pf_smp_aes_get_context</a> )()</td></tr>
<tr class="memdesc:afc85741fae7178abb83c60ea9df1060b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function to get a pointer to active aes_context.  <a href="#afc85741fae7178abb83c60ea9df1060b">More...</a><br /></td></tr>
<tr class="separator:afc85741fae7178abb83c60ea9df1060b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a276ee4a8cac87d0077b3ea05a304e372"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwiced__bt__smp__adapter__t.html#a276ee4a8cac87d0077b3ea05a304e372">pf_smp_aes_set_key</a> )(const unsigned char key[], uint8_t keylen, <a class="el" href="group__wiced__bt__platform__group.html#ga7f85f07f930fed2fc50e855a69e7abcd">aes_context</a> *p_ctx)</td></tr>
<tr class="memdesc:a276ee4a8cac87d0077b3ea05a304e372"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function to set key for encryption.  <a href="#a276ee4a8cac87d0077b3ea05a304e372">More...</a><br /></td></tr>
<tr class="separator:a276ee4a8cac87d0077b3ea05a304e372"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a22d366dda284b66067089f2f9cea7188"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwiced__bt__smp__adapter__t.html#a22d366dda284b66067089f2f9cea7188">pf_smp_aes_encrypt</a> )(const unsigned char in[], unsigned char out[], <a class="el" href="group__wiced__bt__platform__group.html#ga7f85f07f930fed2fc50e855a69e7abcd">aes_context</a> *p_ctx)</td></tr>
<tr class="memdesc:a22d366dda284b66067089f2f9cea7188"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function to do the encryption.  <a href="#a22d366dda284b66067089f2f9cea7188">More...</a><br /></td></tr>
<tr class="separator:a22d366dda284b66067089f2f9cea7188"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee5789863160425af566fd596bcd0872"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structwiced__bt__smp__adapter__t.html#aee5789863160425af566fd596bcd0872">pf_smp_aes_finish</a> )(<a class="el" href="group__wiced__bt__platform__group.html#ga7f85f07f930fed2fc50e855a69e7abcd">aes_context</a> *p_ctx, uint8_t *output_external, size_t output_size, size_t *output_length)</td></tr>
<tr class="memdesc:aee5789863160425af566fd596bcd0872"><td class="mdescLeft">&#160;</td><td class="mdescRight">Callback function to finish encryption.  <a href="#aee5789863160425af566fd596bcd0872">More...</a><br /></td></tr>
<tr class="separator:aee5789863160425af566fd596bcd0872"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Field Documentation</h2>
<a id="aa59d753b4864101d3ffe3793fefbd50b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa59d753b4864101d3ffe3793fefbd50b">&#9670;&nbsp;</a></span>pf_smp_process_private_key</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(* wiced_bt_smp_adapter_t::pf_smp_process_private_key) (const <a class="el" href="group__bt__types.html#gaba2488b09b25fdc24ea75828d1dbf73d">BT_OCTET32</a> *private_key, <a class="el" href="structwiced__bt__public__key__t.html">wiced_bt_public_key_t</a> *public_key)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function to generate local public key. </p>
<p>Called by stack to generate local public key by processing local private key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">private_key</td><td>: Pointer to local private key </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">public_key</td><td>: Pointer to generated public key</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>: wiced_result_t </dd></dl>

</div>
</div>
<a id="a1d8b53f5e1374c5f60f80234d61e0f15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d8b53f5e1374c5f60f80234d61e0f15">&#9670;&nbsp;</a></span>pf_smp_compute_dhkey</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(* wiced_bt_smp_adapter_t::pf_smp_compute_dhkey) (const <a class="el" href="group__bt__types.html#gaba2488b09b25fdc24ea75828d1dbf73d">BT_OCTET32</a> *private_key, const <a class="el" href="structwiced__bt__public__key__t.html">wiced_bt_public_key_t</a> *public_key, <a class="el" href="group__bt__types.html#gaba2488b09b25fdc24ea75828d1dbf73d">BT_OCTET32</a> *dhkey)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function to generate dhkey. </p>
<p>Called by stack to generate diffie-hellman key using peer public key and local private key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">private_key</td><td>: Pointer to local private key </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">public_key</td><td>: Pointer to peer public key </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">dhkey</td><td>: Pointer to generated dhkey</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>: wiced_result_t </dd></dl>

</div>
</div>
<a id="a7309a1ab817250593f4b59e4211fd1ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7309a1ab817250593f4b59e4211fd1ce">&#9670;&nbsp;</a></span>pf_smp_ecdh_validate_pub_key</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(* wiced_bt_smp_adapter_t::pf_smp_ecdh_validate_pub_key) (const <a class="el" href="structwiced__bt__public__key__t.html">wiced_bt_public_key_t</a> *public_key)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function to validate peer public key. </p>
<p>Called by stack to validate peer public key</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">public_key</td><td>: Pointer to peer public key</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>: wiced_result_t </dd></dl>

</div>
</div>
<a id="afc85741fae7178abb83c60ea9df1060b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc85741fae7178abb83c60ea9df1060b">&#9670;&nbsp;</a></span>pf_smp_aes_get_context</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__wiced__bt__platform__group.html#ga7f85f07f930fed2fc50e855a69e7abcd">aes_context</a>*(* wiced_bt_smp_adapter_t::pf_smp_aes_get_context) ()</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function to get a pointer to active aes_context. </p>
<p>Callback function to get a pointer to active aes_context for encryption operation</p>
<dl class="section return"><dt>Returns</dt><dd>: pointer to aes_context </dd></dl>

</div>
</div>
<a id="a276ee4a8cac87d0077b3ea05a304e372"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a276ee4a8cac87d0077b3ea05a304e372">&#9670;&nbsp;</a></span>pf_smp_aes_set_key</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(* wiced_bt_smp_adapter_t::pf_smp_aes_set_key) (const unsigned char key[], uint8_t keylen, <a class="el" href="group__wiced__bt__platform__group.html#ga7f85f07f930fed2fc50e855a69e7abcd">aes_context</a> *p_ctx)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function to set key for encryption. </p>
<p>Called by stack to provide key details to be used for encryption</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>: Pointer to key</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">keylen</td><td>: length of the key</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ctx</td><td>: Pointer to active aes_context</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>: wiced_result_t </dd></dl>

</div>
</div>
<a id="a22d366dda284b66067089f2f9cea7188"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a22d366dda284b66067089f2f9cea7188">&#9670;&nbsp;</a></span>pf_smp_aes_encrypt</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(* wiced_bt_smp_adapter_t::pf_smp_aes_encrypt) (const unsigned char in[], unsigned char out[], <a class="el" href="group__wiced__bt__platform__group.html#ga7f85f07f930fed2fc50e855a69e7abcd">aes_context</a> *p_ctx)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function to do the encryption. </p>
<p>Called by stack to encrypt given data</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>: Pointer to input data to be encrypted. Input data is always 16 bytes in length.</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">out</td><td>: Pointer to encrypted data. Encrypted data is always 16 bytes in length.</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ctx</td><td>: Pointer to aes_context</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>: wiced_result_t </dd></dl>

</div>
</div>
<a id="aee5789863160425af566fd596bcd0872"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee5789863160425af566fd596bcd0872">&#9670;&nbsp;</a></span>pf_smp_aes_finish</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___result.html#gacfc32ead8a827d53416f01b19eb58310">wiced_result_t</a>(* wiced_bt_smp_adapter_t::pf_smp_aes_finish) (<a class="el" href="group__wiced__bt__platform__group.html#ga7f85f07f930fed2fc50e855a69e7abcd">aes_context</a> *p_ctx, uint8_t *output_external, size_t output_size, size_t *output_length)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Callback function to finish encryption. </p>
<p>Called by stack to finish encrypting a message</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ctx</td><td>: Pointer to aes_context</td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">output_external</td><td>: Buffer where the output is to be written</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output_size</td><td>: Size of the <code>output_external</code> buffer in bytes.</td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">output_length</td><td>: On success, the number of bytes that make up the returned output</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>: wiced_result_t </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>Bluetooth Host Stack Library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
</body>
</html>
